﻿using Abp.Domain.Entities.Auditing;
using KDS.Mes.Mes.StorageAlcCodes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KDS.Mes.Mes.Storages
{
    /// <summary>
    /// 仓库信息
    /// </summary>
    [Table("T_BasicStorage")]
    public class Storage : FullAuditedEntity
    {
        /// <summary>
        /// 仓库名称
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string StorageName { get; set; }

        /// <summary>
        /// 仓库代码
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string StorageCode { get; set; }

        /// <summary>
        /// AlcCodes of this line.
        /// </summary>
        [ForeignKey("StorageId")]
        public virtual ICollection<StorageAlcCode> AlcCodes { get; set; }

        public Storage( string storageName, string storageCode)
        {
            StorageName = storageName;
            StorageCode = storageCode;

        }

        public Storage()
        {

        }
    }
}
